package com.example.demo.service.impl;

import com.example.demo.mapper.Score3Mapper;
import com.example.demo.pojo.Score3;
import com.example.demo.service.Score3Service;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class Score3ServiceImpl implements Score3Service {

    @Resource
    private Score3Mapper score3Mapper;

    @Override
    public void addScore(Score3 score) {
        score3Mapper.addScore(score);
    }

    @Override
    public void deleteScore(Integer studentId) {
        score3Mapper.deleteById(studentId);
    }

    @Override
    public void updateScore(Score3 score) {
        score3Mapper.update(score);
    }

    @Override
    public List<Score3> getAllScores() {
        return score3Mapper.selectAll();
    }

    @Override
    public Score3 getScoreById(Integer studentId) {
        return score3Mapper.selectById(studentId);
    }
}












